package com.guoning.office_system.service.impl;

import com.guoning.office_system.mapper.RoleFunctionMapper;
import com.guoning.office_system.model.RoleFunction;
import com.guoning.office_system.service.RoleFunctionService;
import com.guoning.office_system.vo.Criteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class RoleFunctionServiceImpl implements RoleFunctionService {
    @Autowired
    RoleFunctionMapper mapper;

    @Override
    public Map getFuncs(Long roleId) {
        Map map = new HashMap();
        map.put("list", mapper.selectFuncByRoleId(roleId));
        map.put("unList", mapper.selectNaNFuncByRoleId(roleId));
        return map;
    }

    @Override
    public int updateForDelete(Criteria criteria) {
        return mapper.updateForDelete(criteria);
    }

    @Override
    public int deleteByPrimaryKey(Long id) {
        return 0;
    }

    @Override
    public int insert(Criteria criteria) {
        return mapper.insert(criteria);
    }

    @Override
    public int insertSelective(RoleFunction record) {
        return 0;
    }

    @Override
    public RoleFunction selectByPrimaryKey(Long id) {
        return null;
    }

    @Override
    public int updateByPrimaryKeySelective(RoleFunction record) {
        return 0;
    }

    @Override
    public int updateByPrimaryKey(RoleFunction record) {
        return 0;
    }
}